﻿using System.Web.Mvc;
using CWB.Web.MVC.Filters;
using CWB.Web.MVC.BaseController;
using CWB.Web.Models.Configuration;
using CWB.Web.MVC.ActionResults;
using CWB.Common.Logging;
using CWB.Common.Constant;
using CWB.Web;

namespace CWB.WebSite.Controllers
{
    public class LoginController : MultiCultureBaseController
    {
        private static readonly ISysLog Log = SysLog.GetLogger(typeof(LoginController));

        public LoginController(LanguageInfo languageInfo)
            : base(languageInfo)
        {
            ControllerPermision = Permission.Public;
        }

        //
        // GET: /Login/
        public ActionResult Index()
        {
            Trading trading = new Trading()
            {
                loginType = LoginType.Agent,
                logoutUrl = "Login",
                isLogined = false,
                chk = Session.SessionID
            };
            sessionData.trading = trading;
            return View();
        }

        //
        // GET: /Login/
        public ActionResult BouLogin()
        {
            Trading trading = new Trading()
            {
                loginType = LoginType.Bo,
                logoutUrl = "Login/BouLogin",
                isLogined = false,
                chk = Session.SessionID
            };
            sessionData.trading = trading;
            return View();
        }
    }
}
